package org.semanticflash.rdf.io
{
	import com.bigflexlib.ds.container.zet.IWSet;
	import com.bigflexlib.x.mx.logging.Log.LogUtil;
	
	import mx.logging.ILogger;
	import mx.logging.Log;
	
	import org.semanticflash.rdf.triple.RDFTriple;
	
	public class RDFSetHandler implements IRDFHandler
	{
		
		private var logger:ILogger;
		
		private var tripleSet:IWSet;
		
		public function RDFSetHandler( tripleSet:IWSet )
		{
			this.tripleSet = tripleSet;
			logger = LogUtil.getStandardLogger( this );
		}
		
		public function startRDF():void
		{
			
		}
		
		public function endRDF():void
		{
			
		}
		
		public function handleTriple( triple:RDFTriple ):void
		{
			
			if ( Log.isDebug() )
				logger.debug( "handleTriple()" + triple );
				
			tripleSet.add( triple );
			
		}
	}
}